﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
namespace LugageTrace.Apresentacao
{
    public partial class ConfigPorta : Form
    {
        

        public ConfigPorta()
        {
            InitializeComponent();
        }

        private void ConfigPorta_Load(object sender, EventArgs e)
        {
            dropBaudRate.SelectedIndex = 1;

            dropPorta.DataSource = SerialPort.GetPortNames();
            
        }

        private void dropPorta_SelectedIndexChanged(object sender, EventArgs e)
        {
            
            

        }

        private void button1_Click(object sender, EventArgs e)
        {
            LugageTrace.Apresentacao.Properties.Settings.Default.Context["PortaSelecionada"] = dropPorta.SelectedItem;
            LugageTrace.Apresentacao.Properties.Settings.Default.Context["BaudRateSelecionado"] = dropBaudRate.SelectedItem;
            this.Close();

        }
    }
}
